﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using System.Text.RegularExpressions;

public partial class Whir_System_Module_Tags_ToAspx : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        RoleHelper.IsLogin();    //登录判断

        //Regex rg = new Regex(@"\{Whir\.Label\.([a-zA-Z]{1,})\/\}");
        //MatchCollection mcs = rg.Matches("asdfadsf{Whir.Label.SystemPath/}adsfads{Whir.Label.SiteTitle/}");
        //Response.Write(mcs[1].Groups[1].Value);
    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        string htmPath = this.txtUrl.Text;
        if (this.txtUrl.Text.IndexOf(':') == -1)
            htmPath = Server.MapPath(this.txtUrl.Text);

        this.TextBox1.Text = Whir.Label.ToAspx.AspxAnalysis(htmPath);

        //string strHtml = Whir.Label.LabelHelper.HtmlAnalysis(htmPath);

        //if (strHtml != "-1")
        //{

        //文件路径
        string path = Server.MapPath(Whir.Common.Settings.GetString("SystemPath") + "Aspx/ListLabel.aspx");
        //生成文件
        Whir.Publish.CreateHtml.WriteFile(path, this.TextBox1.Text);
        //}
    }
}
